//package zwz.importTask.config;
//
//import com.baomidou.mybatisplus.core.MybatisConfiguration;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.mybatis.spring.SqlSessionFactoryBean;
//import org.mybatis.spring.SqlSessionTemplate;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//
//
//@Configuration
//public  class MPConfig {
//    @Configuration
//    public static class MybatisPlusConfig {
//        @Autowired
//        private DataSource dataSource;
//
//
//
//        @Bean
//        public SqlSessionFactory sqlSessionFactory() throws Exception {
//            SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
//            factoryBean.setDataSource(dataSource);
//            factoryBean.setConfiguration(mybatisConfiguration());
//            return factoryBean.getObject();
//        }
//
//        @Bean
//        public MybatisConfiguration mybatisConfiguration() {
//            MybatisConfiguration config = new MybatisConfiguration();
//            config.setMapUnderscoreToCamelCase(true);
//            return config;
//        }
//
//        @Bean
//        public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory) {
//            return new SqlSessionTemplate(sqlSessionFactory);
//        }
//    }
//}